AssetManager (PIXI) Class
[PIXI-only] Asset Manager is responsible for managing different resolutions of assets and spritesheets based on the resolution of the stage. This is a helpful optimization for PIXI which some low-hardware devices have a problem keeping up with.
Item Index
Methods
- getAnims static
- getPreferredScale static
- getPreferredSize static
- getUrl static
- init static
- pickScale static
- unload static
- unloadAsset static
Methods
getAnims
(
Object
static
-
anims
-
[maxDigits=4]
-
[outObj]
Get the collection of assets that are also animations
Parameters:
Returns:
Object:
An collection of PIXI.Textures for each animation id suitable for use in PIXI.MovieClip
getPreferredScale
()
Number
static
Get the preferred scale amount
Returns:
Number:
The scale amount associated with the preferred size
getPreferredSize
()
String
static
Get the alias of the preferred size to use
Returns:
String:
The alias for the preferred size
getUrl
(
static
-
assetId
Get a asset url by asset id
Parameters:
-
assetId
StringThe unique asset kdy
init
(
static
-
config
-
width
-
height
Initialize the asset manager
pickScale
(
private
static
-
width
-
height
Pick the preferred scale based on the screen resolution
unload
(
static
-
assetOrAsset
Unload an asset
unloadAsset
(
private
static
-
asset
Unload an asset
Parameters:
-
asset
StringThe asset id to unload